local Sign = class("Sign")

function Sign:ctor()

end

function Sign:write(value)
    value.year = self.year
    value.month = self.month
    value.day = self.day
    value.bSign = self.bSign
    value.bAlreadyGot = self.bAlreadyGot
end

local check = function(v,d)
    if v then
        return v
    else
        return d
    end
end

function Sign:read(value)
    self.year = check(value.year,self.year)
    self.month = check(value.month,self.month)
    self.day = check(value.day,self.day)
    self.bSign = check(value.bSign,self.bSign)
    self.bAlreadyGot = check(value.bAlreadyGot,self.bAlreadyGot)
    self.uid = self.year .. self.month .. self.day
    -- print("Sign:ctor  ------ self.uid = ",self.uid)
    -- print("Sign:ctor  ------ self.year = ",self.year)
    -- print("Sign:ctor  ------ self.month = ",self.month)
    -- print("Sign:ctor  ------ self.day = ",self.day)
    -- print("Sign:ctor  ------ self.bSign = ",self.bSign)
    -- print("Sign:ctor  ------ self.bAlreadyGot = ",self.bAlreadyGot)
end


return Sign